<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="SunVoucherFilter.aspx.cs" Inherits="Admin_SunVoucherFilter" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">

    <script type="text/javascript">
        function ClearForm() {
            $('#<%=tb_AccCode.ClientID%>').val('');
            $('#<%=tb_SunReferenceFrom.ClientID%>').val('');
            $('#<%=tb_SunReferenceTo.ClientID%>').val('');
            $('#<%=tb_VoucherDateFrom.ClientID%>').val('');
            $('#<%=tb_VoucherDateTo.ClientID%>').val('');
            $('#<%=ddl_AccName.ClientID%>').val('0');
            return false;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<script type="text/javascript">
        function ClearForm() {
            //$('#<%tb_AccCode.ClientID%>').text('');
            return false;
        }
    </script>--%>
    <table>
        <tr>
            <td style="width: 100px">
                Sun Reference:
            </td>
            <td>
                <asp:TextBox ID="tb_SunReferenceFrom" runat="server" CssClass="text-input"></asp:TextBox>
            </td>
            <td>
                to
            </td>
            <td>
                <asp:TextBox ID="tb_SunReferenceTo" runat="server" CssClass="text-input"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Voucher Date:
            </td>
            <td>
                <asp:TextBox ID="tb_VoucherDateFrom" runat="server" CssClass="text-input datepicker"></asp:TextBox>
            </td>
            <td>
                to
            </td>
            <td>
                <asp:TextBox ID="tb_VoucherDateTo" runat="server" CssClass="text-input datepicker"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Acc Code:
            </td>
            <td>
                <asp:TextBox ID="tb_AccCode" runat="server" CssClass="text-input"></asp:TextBox>
            </td>
            <td>
                Acc Name:
            </td>
            <td>
                <data:EntityDropDownList ID="ddl_AccName" runat="server">
                </data:EntityDropDownList>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btn_Filter" runat="server" Text="Filter" CssClass="button" OnClick="btn_Filter_Click" />&nbsp;
                <asp:Button ID="btn_Clear" runat="server" Text="Clear" CssClass="button" OnClientClick="return ClearForm();" />
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:Label ID="lbl_Error" runat="server" Text="" ForeColor="Red" Font-Bold="True"></asp:Label>
            </td>
        </tr>
    </table>
    <h3>
        Data
    </h3>
    <data:EntityGridView ID="grv_BatchList" runat="server" AutoGenerateColumns="False"
        AllowPaging="True" DataSourceID="" AllowExportToExcel="True" AllowSorting="True"
        ExportToExcelText="Excel" PageSelectorPageSizeInterval="10" OnPageIndexChanging="grv_BatchList_PageIndexChanging"
        AllowMultiColumnSorting="False" DefaultSortColumnName="AccntCode" DefaultSortDirection="Ascending"
        RecordsCount="0" ShowGridOnEmptyData="False" OnExcelBeforeFormat="grv_BatchList_ExcelBeforeFormat">
        <Columns>
            <asp:BoundField DataField="AccntCode" HeaderText="AccntCode" SortExpression="AccntCode" />
            <asp:BoundField DataField="TransDate" HeaderText="TransDate" SortExpression="TransDate" />
            <asp:BoundField DataField="Period" HeaderText="Period" SortExpression="Period" />
            <asp:BoundField DataField="JrnalNo" HeaderText="JrnalNo" SortExpression="JrnalNo" />
            <asp:BoundField DataField="JrnalLine" HeaderText="JrnalLine" SortExpression="JrnalLine" />
            <asp:BoundField DataField="Treference" HeaderText="Treference" SortExpression="Treference" />
            <asp:BoundField DataField="Amount" HeaderText="Amount" SortExpression="Amount" />
            <asp:BoundField DataField="DC" HeaderText="DC" SortExpression="DC" />
            <asp:BoundField DataField="Descriptn" HeaderText="Descriptn" SortExpression="Descriptn" />
            <asp:BoundField DataField="ConvRate" HeaderText="ConvRate" SortExpression="ConvRate" />
            <asp:BoundField DataField="OtherAmt" HeaderText="OtherAmt" SortExpression="OtherAmt" />
            <asp:BoundField DataField="AnalT0" HeaderText="AnalT0" SortExpression="AnalT0" />
            <asp:BoundField DataField="AnalT1" HeaderText="AnalT1" SortExpression="AnalT1" />
            <asp:BoundField DataField="AnalT2" HeaderText="AnalT2" SortExpression="AnalT2" />
            <asp:BoundField DataField="AnalT3" HeaderText="AnalT3" SortExpression="AnalT3" />
            <asp:BoundField DataField="AnalT4" HeaderText="AnalT4" SortExpression="AnalT4" />
            <asp:BoundField DataField="AnalT5" HeaderText="AnalT5" SortExpression="AnalT5" />
            <asp:BoundField DataField="AllocRef" HeaderText="AllocRef" SortExpression="AllocRef" />
            <asp:BoundField DataField="SunRefer" HeaderText="SunRefer" SortExpression="SunRefer" />
            <asp:BoundField DataField="JrnalSrce" HeaderText="JrnalSrce" SortExpression="JrnalSrce" />
            <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
            <asp:BoundField DataField="UserPrinted" HeaderText="UserPrinted" SortExpression="UserPrinted" />
            <asp:BoundField DataField="DatePrinted" HeaderText="DatePrinted" SortExpression="DatePrinted" />
        </Columns>
    </data:EntityGridView>
</asp:Content>
